<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<f:view>

    <link href="/general/css/admin_1.css" rel="stylesheet" type="text/css"/>

    <h:form>
        <table width="100%" border="0" cellpadding="2" cellspacing="2" class="tablanormal">
            <tr>
                <td width="8%" align="right">Módulos: </td>
                <td width="92%">
                    <h:selectOneMenu value="#{MenuController.modCodigo}" onchange="submit();">
                        <f:selectItems value="#{ModuloController.comboModulo}" />
                    </h:selectOneMenu>
                </td>
            </tr>
            <tr>
                <td align="right">Menú: </td>
                <td>
                    <h:selectOneMenu value="#{MenuController.menuAlterno}" rendered="#{MenuController.esPagina==true}">
                        <f:selectItems value="#{MenuController.comboMenu}" />
                    </h:selectOneMenu>
                    <h:inputText value="#{MenuController.menu.menNombre}" rendered="#{MenuController.esPagina==false}"/>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <h:outputLabel value="Sub Menu: " rendered="#{MenuController.esPagina==true}" />
                </td>
                <td>
                    <h:inputText value="#{MenuController.menu.menNombre}" rendered="#{MenuController.esPagina==true}" size="50" maxlength="50"/>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <h:outputLabel value="Ruta Pagina: " rendered="#{MenuController.esPagina==true}"/>
                </td>
                <td>
                    <h:inputText value="#{MenuController.menu.menrutaPagina}" rendered="#{MenuController.esPagina==true}" size="80" maxlength="80"/>
                    &nbsp;
                    <h:outputLabel value="(Ejm. carpeta/archivo.jsp)" styleClass="desactivar"/>
                </td>
            </tr>
            <tr>
                <td align="right">Orden: </td>
                <td>
                    <h:inputText value="#{MenuController.menu.menOrden}" size="5" maxlength="5" />
                </td>
            </tr>
            <tr>
                <td align="right">Descripción: </td>
                <td><h:inputTextarea value="#{MenuController.menu.menDescripcion}" rows="3" cols="30" /></td>
            </tr>
        </table>
        <h:commandButton action="#{MenuController.actualizar}" value="Grabar"/>
        <h:commandButton action="listar" value="Cancelar" />
    </h:form>
</f:view>